package com.hipac.qs;

import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.impl.StdSchedulerFactory;

/**
 * Created by xiaogu on 2017/2/22.
 */
public class QuartzTest {
    public static void main(String[] args) {

        try {
            // Grab the Scheduler instance from the Factory
            Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler();

            // and start it off
            scheduler.start();

            scheduler.shutdown();

        } catch (SchedulerException se) {
            se.printStackTrace();
        }
    }
    /*
     当你调用StdSchedulerFactory.getDefaultScheduler()获取scheduler实例对象后，
     在调用scheduler.shutdown()之前，scheduler不会终止，因为还有活跃的线程在执行。
     */
}
